package com.sbillings.messenger.hub;

import java.util.Observable;

/**
 * This class uses the java Observable class to manage subscribers,
 * and is a MessagePublisher (provides a publish() method that can be
 * used to send a given Message to its subscribers).
 * @author steve.billings
 *
 */
public class Publisher extends Observable implements MessagePublisher {
	
	/**
	 * Send the given Message to all subscribers.
	 * Subscribers may filter out message types they don't care about.
	 */
	public void publish(Message message) {
		setChanged();
		notifyObservers(message);
	}
	


}
